<?		
		function version_number() {
			global $drizzo_options;

			use_db_drizzo();

			$version_check = mysql_query("SELECT * FROM `$drizzo_options` WHERE `name`='version_number'");
			if($version_check) {
				while($row = mysql_fetch_array($version_check)) {
					$version = $row['value'];
				}
				return $version;
			} else {
				return false;
			}
		}
		
		function version_status() {
			global $drizzo_options;

			use_db_drizzo();

			$version_check = mysql_query("SELECT * FROM `$drizzo_options` WHERE `name`='version_type'");
			if($version_check) {
				while($row = mysql_fetch_array($version_check)) {
					$version = $row['value'];
				}
				return $version;
			} else {
				return false;
			}
		}

		function get_page_id() {
			$pageid = "";
			$req_uri = $_SERVER['REQUEST_URI'];
			$url = strip_tags($req_uri);
			$url_array = explode("/",$url);
			array_shift($url_array); //the first one is empty anyway
			$url_no = count($url_array) - 1;
			$pageid = $url_array[$url_no];
			$pageid = preg_replace('/.php/', '', $pageid);
			$pageid = explode("?", $pageid);
			$pageid = $pageid[0];
			if((!$pageid) || ($pageid == "index")) {$pageid = "base";}
			define("pageid", $pageid);
			return pageid;
		}

		function get_page_type() {
			$pageid = "";
			$req_uri = $_SERVER['REQUEST_URI'];
			$url = strip_tags($req_uri);
			$url_array = explode("/",$url);
			array_shift($url_array); //the first one is empty anyway
			$pagetype = $url_array[0];
			$pagetype = preg_replace('/.php/', '', $pagetype);
			$pagetype = explode("?", $pagetype);
			$pagetype = $pagetype[0];
			if("/" . $pagetype  . "/" == admin_folder) { $pagetype = "admin"; }
			if(!$pagetype) {$pagetype = "page";}
			define("pagetype", $pagetype);
			return pagetype;
		}

		$config_uri = $_SERVER['DOCUMENT_ROOT'] . "/drizzo/engine/config.php";
		@require_once($config_uri);
		require_once('functions_db.php');
		require_once('functions_install.php');
		require_once('functions_post.php');
		require_once('functions_backend.php');
		require_once('functions_frontend.php');
		require_once('functions_comments.php');
		require_once('functions_login.php');
		require_once('functions_trashheap.php');	
?>